package tcpVerbindung;

import java.io.DataOutputStream;
import java.io.IOException;
import java.net.Socket;

public class SendenListe {

	/**
	 * 
	 * @param socket
	 * @param datenWort
	 * @param datenParameter
	 * @throws IOException
	 */
	public static void sendenListe(Socket socket, short[] datenWort, int[] datenParameter) throws IOException {

		DataOutputStream outToServer = new DataOutputStream(socket.getOutputStream());

		for (int i = 0; i < 5; i++) {

			for (int j = 0; j < datenWort.length; j++) {
				outToServer.writeShort(datenWort[j]);
			}

			for (int j = 0; j < datenParameter.length; j++) {
				outToServer.writeInt(datenParameter[j]);
			}

			outToServer.flush();

			try {
				Thread.sleep(10);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}

		}
	}
}
